package view;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

import sun.audio.AudioPlayer;
import sun.audio.AudioStream;


public class Audio {
	private Audio(){}
	
	// plays a sound
	public static void playSound(String path) {
		
			try {
				InputStream in;
				in = new FileInputStream(path);
				AudioStream as = new AudioStream(in);         
				AudioPlayer.player.start(as);            
			} catch (IOException e) {
				e.printStackTrace();
			}
	}
}
